const Router = require("koa-router");
const router = new Router();

// 认证服务
const authRouter = require("./modules/auth/auth.router");

// 库存
const inventoryRouter = require("./modules/inventory/inventory.router");
// 文件
const fileRouter = require("./modules/file/file.router");
// 订单
const orderRouter = require("./modules/order/order.router");
// 用户
const userRouter = require("./modules/user/user.router");
// 产品
const productRouter = require("./modules/product/product.router");
// 桌台
const tableRouter = require("./modules/table/table.router");

// 注册模块
router.use(authRouter.routes(), authRouter.allowedMethods());
router.use(inventoryRouter.routes(), inventoryRouter.allowedMethods());
router.use(fileRouter.routes(), fileRouter.allowedMethods());
router.use(orderRouter.routes(), orderRouter.allowedMethods());
router.use(userRouter.routes(), userRouter.allowedMethods());
router.use(productRouter.routes(), productRouter.allowedMethods());
router.use(tableRouter.routes(), tableRouter.allowedMethods());

module.exports = router;
